﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PublishWorkflow.aspx.cs" Inherits="SaaS.PublishWorkflow" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Publish Workflow</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <asp:HyperLink ID="HyperLink1" runat="server" 
            NavigateUrl="~/PublishingManager.aspx">&lt;- Back</asp:HyperLink>
        <br />
    
        <asp:Label ID="Label3" runat="server" Font-Bold="True" Font-Size="Large" 
            Text="Workflow Setup"></asp:Label>
        <br />
        Here you may pusblish a workflow that are to be used as a template.<br />
        <asp:Label ID="Label1" runat="server" Text="Workflow Name:"></asp:Label>
&nbsp;&nbsp;
        <asp:TextBox ID="txtWorkflowName" runat="server" style="margin-left: 32px"></asp:TextBox>
        <br />
        <asp:Label ID="Label2" runat="server" Text="Workflow Description:"></asp:Label>
        <asp:TextBox ID="txtWorkflowDescription" runat="server" 
            style="margin-left: 11px"></asp:TextBox>
        <br />
        <asp:Button ID="Button1" runat="server" onclick="Button1_Click" 
            style="margin-left: 186px" Text="Add" />
        <br />
        <br />
        <asp:GridView ID="gvWorkflows" runat="server" 
            onrowcommand="gvWorkflows_RowCommand" 
            onrowdeleting="gvWorkflows_RowDeleting" AutoGenerateColumns="False" 
            CellPadding="4" DataKeyNames="System_Workflow_ID" DataSourceID="SqlDataSource1" 
            ForeColor="#333333" GridLines="None">
            <RowStyle BackColor="#EFF3FB" />
            <Columns>
                <asp:BoundField DataField="System_Workflow_ID" HeaderText="ID" ReadOnly="True" 
                    SortExpression="System_Workflow_ID" />
                <asp:BoundField DataField="System_Workflow_Name" HeaderText="Name" 
                    SortExpression="System_Workflow_Name" />
                <asp:BoundField DataField="System_Workflow_Description" 
                    HeaderText="Description" SortExpression="System_Workflow_Description" />
                <asp:ButtonField CommandName="Ed" Text="Edit..." />
                <asp:ButtonField CommandName="Del" Text="Delete" />
            </Columns>
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <EditRowStyle BackColor="#2461BF" />
            <AlternatingRowStyle BackColor="White" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:MiniSaaSConnectionString %>" 
            SelectCommand="SELECT * FROM [SYSTEM_WORKFLOW]"></asp:SqlDataSource>
        <hr />
        <asp:Label ID="Label4" runat="server" Font-Bold="True" Font-Size="Large" 
            Text="Workflow Services Setup"></asp:Label>
        <br />
        Click &quot;Edit...&quot; on one of the items above to add services to a workflow. Add 
        whatever services are desired by selecting that service from the drop down box 
        and click &quot;Add.&quot; These will be the recommended services for the workflow.<br />
        <br />
        <asp:Label ID="Label5" runat="server" Text="Workflow ID:"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Label ID="lblWorkflowID" runat="server"></asp:Label>
        <br />
        <asp:Label ID="Label6" runat="server" Text="Workflow Name:"></asp:Label>
&nbsp;
        <asp:Label ID="lblWorkflowName" runat="server"></asp:Label>
        <br />
        <br />
        Add Service:&nbsp;&nbsp;         <asp:DropDownList ID="ddlServices" 
            runat="server" Height="19px" Width="250px" AutoPostBack="True" Enabled="False">
        </asp:DropDownList>
&nbsp;
        <asp:Button ID="Button2" runat="server" onclick="Button2_Click" Text="Add" 
            Enabled="False" />
        <br />
        <asp:GridView ID="gvServices" runat="server" AutoGenerateColumns="False" 
            CellPadding="4" DataKeyNames="Service_ID" 
            ForeColor="#333333" GridLines="None" onrowcommand="gvServices_RowCommand">
            <RowStyle BackColor="#EFF3FB" />
            <Columns>
                <asp:BoundField DataField="Service_ID" HeaderText="ID" ReadOnly="True" 
                    SortExpression="Service_ID" />
                <asp:BoundField DataField="Service_Name" HeaderText="Name" 
                    SortExpression="Service_Name" />
                <asp:BoundField DataField="Service_Path" HeaderText="Path" 
                    SortExpression="Service_Path" />
                <asp:BoundField DataField="Service_Function_Name" HeaderText="Function Name" 
                    SortExpression="Service_Function_Name" />
                <asp:BoundField DataField="Service_Description" HeaderText="Description" 
                    SortExpression="Service_Description" />
                <asp:ButtonField CommandName="Del" Text="Remove" />
            </Columns>
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <EditRowStyle BackColor="#2461BF" />
            <AlternatingRowStyle BackColor="White" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:MiniSaaSConnectionString %>" 
            SelectCommand="SELECT [Service_ID], [Service_Name], [Service_Path], [Service_Function_Name], [Service_Description] FROM [SERVICE]"></asp:SqlDataSource>
        <br />
        <br />
    
    </div>
    </form>
</body>
</html>
